export const useSortable = (dom: HTMLElement, options: any) => {
    let SortableObj: any = null;
    async function initSortable() {
        const Sortable = (await import('sortablejs')).default;
        SortableObj = Sortable.create(dom, {
            animation: 500,
            delay: 400,
            delayOnTouchOnly: true,
            ...options
        });
    }
    //销毁拖拽
    const destorySortable = () => {
        SortableObj && SortableObj.destroy();
    };
    return { initSortable, destorySortable };
};
